import request from '@/utils/request'

// 入库列表
export function fetchStoEnterList(params) {
  return request({
    url: '/operation/opStockEnter/queryList',
    method: 'get',
    params: {
      'billStt': params.billStt,
      'endDate': params.endDate,
      'equipmentName': params.equipmentName,
      'pageIndex': params.pageIndex,
      'pageSize': params.pageSize
    },
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqGet'

  })
}

// 采购入库
export function purchaseEnter(data) {
  return request({
    url: '/operation/opStockEnter/purchaseEnter',
    method: 'post',
    data,
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqPost'

  })
}

// 退货入库
export function returnEnter(data) {
  return request({
    url: '/operation/opStockEnter/returnEnter',
    method: 'post',
    data,
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqPost'

  })
}

// 删除入库单
export function stockEnterDelete(id) {
  return request({
    url: '/operation/opStockEnter/delete',
    method: 'delete',
    params: { id },
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqDelete'

  })
}

// 修改入库单
export function stockEnterUpdate(data) {
  return request({
    url: '/operation/opStockEnter/update',
    method: 'put',
    data,
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqPut'

  })
}
